package org.example.PoJo;

import java.util.Arrays;
import java.util.Date;

public class Message {
    public int Mid;
    public  int Sender;
    public  String Text;
    public Date    Date;
    public  byte[] Photo;

    public int getMid() {
        return Mid;
    }

    public void setMid(int mid) {
        Mid = mid;
    }

    public int getSender() {
        return Sender;
    }

    public void setSender(int sender) {
        Sender = sender;
    }

    public String getText() {
        return Text;
    }

    public void setText(String text) {
        Text = text;
    }

    public java.util.Date getDate() {
        return Date;
    }

    public void setDate(java.util.Date date) {
        Date = date;
    }

    public byte[] getPhoto() {
        return Photo;
    }

    public void setPhoto(byte[] photo) {
        Photo = photo;
    }

    public Message(int mid, int sender, String text, java.util.Date date, byte[] photo) {
        Mid = mid;
        Sender = sender;
        Text = text;
        Date = date;
        Photo = photo;
    }

    public Message() {
    }

    @Override
    public String toString() {
        return "Message{" +
                "Mid=" + Mid +
                ", Sender=" + Sender +
                ", Text='" + Text + '\'' +
                ", Date=" + Date +
                ", Photo=" + Arrays.toString(Photo) +
                '}';
    }
}
